package com.boost.nio;

import java.nio.channels.Selector;

public class SelectorTest {
    public static void main(String[] args) throws Exception {  
        Selector selector = Selector.open();
        selector.wakeup();
        selector.wakeup();
        int i = selector.select(1000);
        System.out.println(i);
        selector.wakeup();
        i = selector.select(1000);
        System.out.println(i);
        selector.wakeup();

        System.out.println(true | a());
    }


    // false false  false
    // true true true
    //false true true
    //true fase true
    public static boolean  a(){
        System.out.println("a 调用了");
        return false;
    }
}  